Integrand size = 33, antiderivative size = 163 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=-\frac {(5 A+2 C) x}{a^2}+\frac {(12 A+5 C) \sin (c+d x)}{a^2 d}-\frac {(5 A+2 C) \cos (c+d x) \sin (c+d x)}{a^2 d}-\frac {2 (5 A+2 C) \cos ^2(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(12 A+5 C) \sin ^3(c+d x)}{3 a^2 d} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4170, 4105, 3872, 2713, 2715, 8} \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=-\frac {(12 A+5 C) \sin ^3(c+d x)}{3 a^2 d}+\frac {(12 A+5 C) \sin (c+d x)}{a^2 d}-\frac {(5 A+2 C) \sin (c+d x) \cos (c+d x)}{a^2 d}-\frac {2 (5 A+2 C) \sin (c+d x) \cos ^2(c+d x)}{3 a^2 d (\sec (c+d x)+1)}-\frac {x (5 A+2 C)}{a^2}-\frac {(A+C) \sin (c+d x) \cos ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 3872
Rule 4105
Rule 4170
Rubi steps \begin{align*} \text {integral}& = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {\int \frac {\cos ^3(c+d x) (-3 a (2 A+C)+a (4 A+C) \sec (c+d x))}{a+a \sec (c+d x)} \, dx}{3 a^2} \\ & = -\frac {2 (5 A+2 C) \cos ^2(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {\int \cos ^3(c+d x) \left (-3 a^2 (12 A+5 C)+6 a^2 (5 A+2 C) \sec (c+d x)\right ) \, dx}{3 a^4} \\ & = -\frac {2 (5 A+2 C) \cos ^2(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(2 (5 A+2 C)) \int \cos ^2(c+d x) \, dx}{a^2}+\frac {(12 A+5 C) \int \cos ^3(c+d x) \, dx}{a^2} \\ & = -\frac {(5 A+2 C) \cos (c+d x) \sin (c+d x)}{a^2 d}-\frac {2 (5 A+2 C) \cos ^2(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(5 A+2 C) \int 1 \, dx}{a^2}-\frac {(12 A+5 C) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{a^2 d} \\ & = -\frac {(5 A+2 C) x}{a^2}+\frac {(12 A+5 C) \sin (c+d x)}{a^2 d}-\frac {(5 A+2 C) \cos (c+d x) \sin (c+d x)}{a^2 d}-\frac {2 (5 A+2 C) \cos ^2(c+d x) \sin (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(12 A+5 C) \sin ^3(c+d x)}{3 a^2 d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(349\) vs. \(2(163)=326\).
Time = 2.14 (sec) , antiderivative size = 349, normalized size of antiderivative = 2.14 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \sec ^2(c+d x) \left (-72 (5 A+2 C) d x \cos \left (\frac {d x}{2}\right )-72 (5 A+2 C) d x \cos \left (c+\frac {d x}{2}\right )-120 A d x \cos \left (c+\frac {3 d x}{2}\right )-48 C d x \cos \left (c+\frac {3 d x}{2}\right )-120 A d x \cos \left (2 c+\frac {3 d x}{2}\right )-48 C d x \cos \left (2 c+\frac {3 d x}{2}\right )+516 A \sin \left (\frac {d x}{2}\right )+264 C \sin \left (\frac {d x}{2}\right )-156 A \sin \left (c+\frac {d x}{2}\right )-120 C \sin \left (c+\frac {d x}{2}\right )+342 A \sin \left (c+\frac {3 d x}{2}\right )+164 C \sin \left (c+\frac {3 d x}{2}\right )+118 A \sin \left (2 c+\frac {3 d x}{2}\right )+36 C \sin \left (2 c+\frac {3 d x}{2}\right )+30 A \sin \left (2 c+\frac {5 d x}{2}\right )+12 C \sin \left (2 c+\frac {5 d x}{2}\right )+30 A \sin \left (3 c+\frac {5 d x}{2}\right )+12 C \sin \left (3 c+\frac {5 d x}{2}\right )-3 A \sin \left (3 c+\frac {7 d x}{2}\right )-3 A \sin \left (4 c+\frac {7 d x}{2}\right )+A \sin \left (4 c+\frac {9 d x}{2}\right )+A \sin \left (5 c+\frac {9 d x}{2}\right )\right )}{48 a^2 d (1+\sec (c+d x))^2} \]
[In]
[Out]
Time = 0.36 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.62
method | result | size |
parallelrisch | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (28 A +12 C \right ) \cos \left (2 d x +2 c \right )-2 A \cos \left (3 d x +3 c \right )+A \cos \left (4 d x +4 c \right )+\left (258 A +112 C \right ) \cos \left (d x +c \right )+219 A +92 C \right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-240 x d \left (A +\frac {2 C}{5}\right )}{48 a^{2} d}\) | \(101\) |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}+9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {4 \left (\left (-5 A -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+\left (-\frac {20 A}{3}-2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (-3 A -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}-4 \left (5 A +2 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(154\) |
default | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}+9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {4 \left (\left (-5 A -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+\left (-\frac {20 A}{3}-2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (-3 A -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}-4 \left (5 A +2 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}\) | \(154\) |
risch | \(-\frac {5 A x}{a^{2}}-\frac {2 x C}{a^{2}}+\frac {i A \,{\mathrm e}^{2 i \left (d x +c \right )}}{4 a^{2} d}-\frac {15 i A \,{\mathrm e}^{i \left (d x +c \right )}}{8 a^{2} d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} C}{2 a^{2} d}+\frac {15 i A \,{\mathrm e}^{-i \left (d x +c \right )}}{8 a^{2} d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} C}{2 a^{2} d}-\frac {i A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{4 a^{2} d}+\frac {2 i \left (15 A \,{\mathrm e}^{2 i \left (d x +c \right )}+9 C \,{\mathrm e}^{2 i \left (d x +c \right )}+27 A \,{\mathrm e}^{i \left (d x +c \right )}+15 C \,{\mathrm e}^{i \left (d x +c \right )}+14 A +8 C \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}+\frac {A \sin \left (3 d x +3 c \right )}{12 a^{2} d}\) | \(225\) |
norman | \(\frac {\frac {\left (5 A +2 C \right ) x}{a}+\frac {\left (19 A +7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{a d}-\frac {\left (A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{6 a d}+\frac {2 \left (5 A +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a}-\frac {2 \left (5 A +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{a}-\frac {\left (5 A +2 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{a}-\frac {3 \left (7 A +3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {\left (11 A +7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 a d}+\frac {\left (25 A +13 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{6 a d}-\frac {\left (97 A +41 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) a}\) | \(269\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.91 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=-\frac {3 \, {\left (5 \, A + 2 \, C\right )} d x \cos \left (d x + c\right )^{2} + 6 \, {\left (5 \, A + 2 \, C\right )} d x \cos \left (d x + c\right ) + 3 \, {\left (5 \, A + 2 \, C\right )} d x - {\left (A \cos \left (d x + c\right )^{4} - A \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, A + C\right )} \cos \left (d x + c\right )^{2} + {\left (33 \, A + 14 \, C\right )} \cos \left (d x + c\right ) + 24 \, A + 10 \, C\right )} \sin \left (d x + c\right )}{3 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \]
[In]
[Out]
\[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {\int \frac {A \cos ^{3}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 325 vs. \(2 (157) = 314\).
Time = 0.29 (sec) , antiderivative size = 325, normalized size of antiderivative = 1.99 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {A {\left (\frac {4 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{2} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {\frac {27 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {60 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )} + C {\left (\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {24 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} + \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{6 \, d} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.17 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=-\frac {\frac {6 \, {\left (d x + c\right )} {\left (5 \, A + 2 \, C\right )}}{a^{2}} - \frac {4 \, {\left (15 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 20 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3} a^{2}} + \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 27 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
[In]
[Out]
Time = 15.37 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.11 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {\left (10\,A+2\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {40\,A}{3}+4\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (6\,A+2\,C\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )}-\frac {x\,\left (5\,A+2\,C\right )}{a^2}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {2\,\left (A+C\right )}{a^2}+\frac {5\,A+C}{2\,a^2}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A+C\right )}{6\,a^2\,d} \]
[In]
[Out]